package com.priv.service;

import com.priv.domain.Book;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author : 十一
 * @data : 13:05 2022/12/28
 * When in doubt, use brute force.
 */
@Transactional
public interface BookService {
    /**
     * 添加
     * @param book
     * @return
     */
    public boolean save(Book book);

    /**
     * 更新
     * @param book
     * @return
     */
    public boolean update(Book book);

    /**
     * 按id删除
     * @param id
     * @return
     */
    public boolean delete(Integer id);

    /**
     * 按id查询
     * @param id
     * @return
     */
    public Book findById(Integer id);


    /**
     * 查询全部
     * @return
     */
    public List<Book> findAll();
}
